﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Data;
using Bussiness;

namespace Presentation
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        public void btnIngresar_Click(object sender, EventArgs e)
        {
            if (ControladoraLogin.Login(Server.HtmlEncode(txtUsr.Text), Server.HtmlEncode(txtPass.Text)) != null)
            {
                Session["isLogged"] = true;
                Response.Redirect("Home.aspx");
            }
            else
            {
                lblRta.Text = "Usuario o Clave Inválida";
            }
        }
    }
}